/***************
 * Home Directory Panel
 */
AIR2.Home.Directory = function() {
    return new AIR2.UI.Panel({
        colspan: 1,
        title: 'Directory',
        iconCls: 'air2-icon-directory',
        collapsed: true,
        showTotal: true,
        showAllLink: AIR2.HOMEURL+'/directory',
        storeData: AIR2.Home.USERDATA,
        itemSelector: '.air2-home-directory-row',
        tpl: new Ext.XTemplate(
            '<table>' +
              '<tpl for="."><tr class="air2-home-directory-row">' +
                '<td><span class="air2-dragzone" air2uuid="{user_uuid}" air2type="U">' +
                  '{[AIR2.Format.userName(values, true)]}</span></td>' +
                '<td><tpl if="values.UserOrg[0]">' +
                  '<span class="air2-dragzone" ' +
                    'air2uuid="{[values.UserOrg[0].Organization.org_uuid]}" ' +
                    'air2type="O">{[AIR2.Format.userOrgShort(values.UserOrg[0], true)]}' +
                  '</span>' +
                '</tpl></td>' +
              '</tr></tpl>' +
            '</table>',
            { compiled: true, disableFormats: true }
        )
    });
}